﻿//导航列表选中 -1:不选中，0：首页选中，1：地图页面选中...
var navActiveIndex = -1;
isNewTopPage = true;

function gotoHomePage() {

    window.location.href = baseURL + "/Home/MapIndex";
}

function locationReg() {
    window.location.href = baseURL + "/LoginRegister/register.html";
}
/*--------------------------跳转MySpace页面-------------------*/
function locationMySpace() {
    window.location.href = baseURL + "/myspace.html";
}

function changeNavActive(idx) {
    if (idx >= 0) {
        var menus = $("#nav li").not(".line");
        menus.eq(menus.length - 1 - idx).addClass("active");
    }
}

$(function () {
    //var html =
    //    "<div id=\"topDiv\">"
    //    + "<div id=\"D_Top\" class=\"DIVtop\">"
    //    + "<div id=\"D_left\"><div id=\"D_logo\" onclick=\"gotoHomePage();\"></div></div>"
    //    + "<div id=\"D_right\"></div><div style=\"clear:both;\"></div>"
    //    + "</div>"
    //    + "    <div id=\"D_menu\" class=\"TopSpan\">"
    //    + "    <ul id=\"nav\">"
    //    + "       <li onclick='javaScript:window.location.href=\"" + baseURL + "/page/mobileHome.html\"'><div id=\"d_kf\"></div><a>综治通APP</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.open(\"../Application/Index#!/supportingSystems\");'><div id=\"d_yj\"></div><a>社会稳定风险评估</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.location.href=\"" + baseURL + "/page/sxzt.html\"'><div id=\"d_sx\"></div><a>指挥调度</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.open(\"http://218.56.29.192:8081/userMgr/entermeeting.jsp?roomID=10000&userName=admin&userType=1&roomPwd=123456\");'><div id=\"d_yy\"></div><a>视频会议</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.open(\"../Application/Index#!/disputeInformations\");'><div id=\"d_zy\"></div><a>矛盾纠纷</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.open(\"http://218.56.29.192:8888/\");'><div id=\"d_zt\"></div><a>雪亮工程</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.open(\"../Application/Index#!/gridPersons\");'><div id=\"d_map\"></div><a class=\"now\">网格管理</a></li>"
    //    + "       <li id=\"line\" class=\"line\"></li>"
    //    + "       <li onclick='javaScript:window.location.href=\"" + baseURL + "/index.html\"'><div></div><a>平台首页</a></li>"
    //    // + "       <li id=\"line\" class=\"line\"></li>"
    //    + "    </ul>"
    //    + "    </div>"
    //    + "    <div class=\"Top_User\">"
    //    + "            <div id=\"userImg\"></div>"
    //    + "            <a id=\"login\" href=\"/Application/Index\" >管理员</a>"
    //    //+ "            <a id=\"reg\" href=\"javascript:void(0)\" onclick=\"locationReg()\">注册</a>"
    //    + "            <div id=\"splitImg\"></div>"
    //    + "            <a id='feedBack' href=\"" + baseURL + "/page/yjfk.html\" style=\"top: 1px;margin-right: 15px; color:#fff\">退出</a>"
    //    + "    </div>"
    //    + "</div>";
    //$("body").prepend(html);

    var morehtml =
            "<div id=\"moreInfo\" class=\"moreInfo\">"
            + "<div id=\"manageInfo\" class=\"infoDetail\" style=\"display:none;\">"
            + "     <a id=\"manageUrl\" href=\"javascript:void(0)\">后台管理</a>"
            + "</div>"
            + "<div id=\"correctInfo\" class=\"infoDetail\" style=\"display:none;\">"
            + "     <a id=\"correctUrl\" href=\"javascript:void(0)\">纠错审核</a>"
            + "</div>"
            + "</div>";
    $("#content").before(morehtml);
    //changeNavActive(navActiveIndex);

    $("#moreImg").hover(function () {
        $("#moreInfo").show();
    }, function () {
        $("#moreInfo").hide();
    });

    $("#portalManager").hover(function () {
        $("#moreInfo").show();
    }, function () {
        $("#moreInfo").hide();
    });
    $("#moreInfo").hover(function () {
        $("#moreInfo").show();
    }, function () {
        $("#moreInfo").hide();
    });

});